<?php /*a:1:{s:59:"F:\ruinuo\new_lowcode\/app/common/template\admin\index.html";i:1713456796;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>系统管理</title>
    <!-- 依 赖 样 式 -->
    <link rel="stylesheet" href="/static/component/pear/css/pear.css"/>
    <!-- 加 载 样 式 -->
    <link rel="stylesheet" href="/static/component/admin/css/loader.css"/>
    <!-- 布 局 样 式 -->
    <link rel="stylesheet" href="/static/component/admin/css/admin.css"/>
</head>
<!-- 结 构 代 码 -->
<body class="layui-layout-body pear-admin">
<!-- 布 局 框 架 -->
<div class="layui-layout layui-layout-admin">
    <!-- 顶 部 样 式 -->
    <div class="layui-header">
        <!-- 菜 单 顶 部 -->
        <div class="layui-logo">
            <div><!-- 图 标 -->
                <img class="logo">
                <!-- 标 题 -->
                <div class="title"></div>
            </div>

        </div>
        <!-- 顶 部 左 侧 功 能 -->
        <ul class="layui-nav layui-layout-left">
            <li class="collapse layui-nav-item"><a href="#" class="layui-icon layui-icon-shrink-right"></a></li>
            <li class="refresh layui-nav-item"><a href="#" class="layui-icon layui-icon-refresh-1" loading=600></a></li>
        </ul>
        <!-- 多 系 统 菜 单 -->
        <div id="control" class="layui-layout-control"></div>
        <!-- 顶 部 右 侧 菜 单 -->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide-xs"><a href="#" class="menuSearch layui-icon layui-icon-search"></a>
            </li>
            <li class="layui-nav-item layui-hide-xs"><a href="#"
                                                        class="fullScreen layui-icon layui-icon-screen-full"></a></li>
            <li class="layui-nav-item layui-hide-xs message"></li>
            <li class="layui-nav-item setting"><a href="#" class="layui-icon layui-icon-more-vertical"></a></li>
        </ul>
    </div>
    <!-- 侧 边 区 域 -->
    <div class="layui-side layui-bg-black">
        <!-- 菜 单 顶 部 -->
        <div class="layui-logo ">
            <div class="dropdown_logo">
                <!-- 图 标 -->
                <img class="logo">
                <!-- 标 题 -->
                <div class="title"></div>
            </div>
        </div>
        <!-- 菜 单 内 容 -->
        <div class="layui-side-scroll">
            <div id="sideMenu"></div>
        </div>
    </div>
    <!-- 视 图 页 面 -->
    <div class="layui-body">
        <!-- 内 容 页 面 -->
        <div id="content"></div>
    </div>
    <!-- 页脚 -->
    <div class="layui-footer layui-text">
				<span class="left">
					Released under the MIT license.
				</span>
        <span class="center"></span>
        <span class="right">
					Copyright © 2021-2022 ruinuocrm.com
				</span>
    </div>
    <!-- 遮 盖 层 -->
    <div class="pear-cover"></div>
    <!-- 加 载 动 画 -->
    <div class="loader-main">
        <!-- 动 画 对 象 -->
        <div class="loader"></div>
    </div>
</div>
<!-- 移 动 端 便 捷 操 作 -->
<div class="pear-collapsed-pe collapse">
    <a href="#" class="layui-icon layui-icon-shrink-right"></a>
</div>
<!-- 依 赖 脚 本 -->
<script src="/static/component/layui/layui.js"></script>
<script src="/static/component/pear/pear.js"></script>
<!-- 框 架 初 始 化 -->
<script>
    var $ = layui.jquery;
    layui.use(['admin', 'jquery', 'popup', 'drawer', 'http'], function () {

        var admin = layui.admin;
        var popup = layui.popup;
        var http = layui.http;
        http.SendAjax('/admin/index/setting', [], [], function (res) {
            var data = res.data || [];
            admin.render(data);
            OnLoad(data);
        })
        // 消息点击回调
        //admin.message(function(id, title, context, form) {});
    })

    function OnLoad(data=[])
    {
        var qrcode=data.logo.qrcode || '';
        layui.dropdown.render({
            elem: '.dropdown_logo',
            trigger: 'hover',
            align: 'center',
            data: data.ex || [],
            click: function (data, othis) {
                var type = data.type || '';
                switch (type) {
                    case 'out':
                        localStorage.setItem("token", '');
                        layui.popup.success("注销成功", function () {
                            location.href = "/admin/index/login";
                        })
                        break;
                    case 'pass':
                        var content='<div style="padding: 15px" class="layui-form">';
                        content+='<div class="design-box">' +
                            '<label class="layui-form-label layui-form-item-required">新密码</label>' +
                            '<div class="layui-input-block">' +
                            '<input name="upass" type="password" placeholder="输入6位数以上的密码" class="layui-input">' +
                            '</div>' +
                            '</div>'
                        content+='<div class="design-box" style="margin-top: 20px">' +
                            '<label class="layui-form-label layui-form-item-required">确认密码</label>' +
                            '<div class="layui-input-block">' +
                            '<input name="ok_upass" type="password" placeholder="输入6位数以上的密码" class="layui-input">' +
                            '</div>' +
                            '</div>'
                        content+='</div>';

                        layui.layer.open({
                            type: 1,
                            title:'修改密码',
                            area: ['450px', '340px'], // 宽高
                            content: content,
                            btn: ['确认修改','取消'],
                            btnAlign: 'c', // 按钮居中显示
                            btn1: function(){
                                var data={
                                    upass:$("input[name='upass']").val(),
                                    ok_upass:$("input[name='ok_upass']").val(),
                                }
                                layui.http.SendAjax('/admin/index/editpass', data, [], function (res) {
                                    if (res.code==200)
                                    {
                                        layui.popup.success("修改成功，请重新登录", function () {
                                            localStorage.setItem("token", '');
                                            location.href = "/admin/index/login";
                                        })
                                    }
                                    else

                                    {
                                        layer.alert(res.msg, {icon: 0, title: '温馨提示'});
                                    }
                                })
                            },
                        });
                        break;
                    case 'store':
                        location.href = "/store/cinema/change/";
                        break;
                    case 'qrcode':
                        layui.layer.open({
                            type: 1,
                            title:'小程序码',
                            area: ['450px', '340px'], // 宽高
                            content: '<div style="padding: 15px"><img src="'+qrcode+'"></div>',
                        });
                        break;
                    case 'cache':
                        layui.http.SendAjax('/admin/buffer/clear', [], [], function (res) {
                            layui.layer.msg('清除成功');
                        })
                        break;
                }

            }
        });
    }
</script>
</body>
</html>
